package com.google.coffeeshop.gui.desktop.orderpayment;
import java.awt.BorderLayout;
import java.awt.ComponentOrientation;

import javax.swing.JPanel;
import javax.swing.border.BevelBorder;

import com.google.coffeeshop.entity.SeatDTO;
import com.google.coffeeshop.gui.desktop.ContentBasePanel;
import com.google.coffeeshop.gui.desktop.MainPanel;

public class OrderPaymentPanel extends ContentBasePanel {
	private static final long serialVersionUID = 1L;
	private SeatBoardPanel pnlSeatBoard;
	private SeatOverviewPanel pnlSeatOverview;
	private MainPanel parent;
	
	public OrderPaymentPanel(String constraints, OrderPaymentActionsPanel orderPaymentActionsPanel, MainPanel parent) {
		super(constraints);
		this.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);
		setLayout(new BorderLayout(0, 5));
		this.parent = parent;
		pnlSeatBoard = new SeatBoardPanel(this, orderPaymentActionsPanel);
		pnlSeatBoard.setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));
		add(pnlSeatBoard, BorderLayout.CENTER);
		
		JPanel panel = new JPanel();
		add(panel, BorderLayout.EAST);
		
		pnlSeatOverview = new SeatOverviewPanel();
		panel.add(pnlSeatOverview);
		
		
	}

	public void showSeatOverview(SeatDTO seat) {
		pnlSeatOverview.showOnGUI(seat);
	}
	
	public void refreshGUI() {
		pnlSeatBoard.refreshGUI();
	}
	
}
